package cn.edu.qzuie.artist.module.td.controller.app.work.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.edu.qzuie.artist.framework.excel.core.annotations.DictFormat;
import cn.edu.qzuie.artist.framework.excel.core.convert.DictConvert;

@Schema(description = "用户 APP - 作品 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppWorkRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24345")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "作品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("作品名称")
    private String workName;

    @Schema(description = "介绍", example = "随便")
    @ExcelProperty("介绍")
    private String description;

    @Schema(description = "上传文件地址")
    @ExcelProperty("上传文件地址")
    private String filepath;

    @Schema(description = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("文件大小")
    private String fileSize;

    @Schema(description = "如果上传的是图片，web端使用压缩的缩略图", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("如果上传的是图片，web端使用压缩的缩略图")
    private String imgSrc;

    @Schema(description = "作品类型：图片，视频，文件", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "作品类型：图片，视频，文件", converter = DictConvert.class)
    @DictFormat("td_work_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer workType;

    @Schema(description = "作品编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("作品编号")
    private String workNo;

    @Schema(description = "是否发布", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否发布", converter = DictConvert.class)
    @DictFormat("td_work_published") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean published;

    @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13")
    @ExcelProperty("分类编号")
    private Long categoryId;

    @Schema(description = "PC-缩略图", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("PC-缩略图")
    private String pcThumnail;

    @Schema(description = "M-缩略图", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("M-缩略图")
    private String mobileThumnail;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15002")
    @ExcelProperty("用户编号")
    private Long userId;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}